package com.example.demo.repo;

import com.example.demo.entity.SysUser;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;



public interface SysUserRepository extends JpaRepository<SysUser,Long> {

    @Cacheable(value = {"myusers"},key = "#p0")
    public SysUser findByUsername(String username);

    @Cacheable(value = {"myusers"},key = "#p0")
    public SysUser findByPassword(String password);


}
